package com.robot.base.common.api;

import com.qihang.annotations.ApiFactory;
import com.robot.base.model.BaseListBean;
import com.robot.base.model.BasePageBean;
import com.robot.base.model.CertDataDTOBean;
import com.robot.base.model.CertDetailDTOBean;
import com.robot.base.model.QuestionDataDTOBean;
import com.robot.base.model.QuestionDetailDTOBean;
import com.robot.base.model.QuestionLogDTOBean;
import com.robot.base.model.QuestionNumBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import me.goldze.mvvmhabit.http.BaseResponse;
import retrofit2.http.FieldMap;
import retrofit2.http.GET;
import retrofit2.http.QueryMap;

@ApiFactory(value = GlBaseApi.class)
public interface IotService {

    @GET("/iot/api/tenant/getQuestionNum")
    Observable<BaseResponse<QuestionNumBean>> getQuestionNum();

    /**
     * 查问题/工单列表（分页)
     */
    @GET("/iot/api/tenant/getQuestionPageList")
    Observable<BaseResponse<BasePageBean<QuestionDataDTOBean>>> getQuestionPageList(@QueryMap Map<String, String> map);

    /**
     * 查问题/工单详情
     *
     * @param map questionId string(query)	问题/工单ID
     * @return
     */
    @GET("/iot/api/tenant/getQuestionDetail")
    Observable<BaseResponse<QuestionDetailDTOBean>> getQuestionDetail(@QueryMap Map<String, String> map);

    /**
     * 查某问题/工单ID对应的流程操作日志列表
     * @param map
     * @return
     */
    @GET("/iot/api/tenant/getLogListByQuestionId")
    Observable<BaseResponse<BaseListBean<QuestionLogDTOBean>>> getLogListByQuestionId(@QueryMap Map<String, String> map);


    /**
     * 查证书列表（分页)
     * @param map
     * @return
     */
    @GET("/iot/api/getCertPageList")
    Observable<BaseResponse<BasePageBean<CertDataDTOBean>>> getCertPageList(@QueryMap Map<String, String> map);

    /**
     * 查证书详情
     * @param map
     * @return
     */
    @GET("/iot/api/getCertDetail")
    Observable<BaseResponse<BasePageBean<CertDetailDTOBean>>> getCertDetail(@QueryMap Map<String, String> map);
}

